<!DOCTYPE html>
<html lang="en" xmlns:v-for="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>v-for测试类</title>
    <script src="../../js/vue/vue.js"></script>
</head>
<body>
<div id="app">
    <ul>
        <!-- index:显示索引 -->
        <li v-for="(u,index) in users">{{u.name}}-{{u.age}}-{{index}}</li>
    </ul>
</div>
<script>
    var app = new Vue({
        el: '#app',
        data: {
            users: [
                {name: "曹阿蛮", age: 100},
                {name: "荀彧", age: 80},
                {name: "刘阿斗", age: 10}
            ]
        }
    })
</script>
</body>
</html>